#include <QApplication>
#include <QObject>
#include <QTextCodec>

#include "qlscoresystem.h"
#include "../DevBase/dllQLsLanguagesManager/qlslanguagesmanager.h"
#include "../DevBase/dllQLsLog/dllqlslog.h"
#include "../AppFramework/dllQLsLoginAppfwk/qlsloginappfwk.h"

int main(int argc, char *argv[])
{
	qputenv("QT_ENABLE_HIGHDPI_SCALING", "1");
	QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
				Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
	QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));

	QApplication a(argc, argv);

	/* 加载语言包 */
	QLsLanguagesManager::GetInstance();

	/* 设置日志文件 */
	DllQLsLog::GetInstance().SetLogPath("");

	QLsLoginAppfwk l;
	QLsCoreSystem w;

	QObject::connect(&l, &QLsLoginAppfwk::sigLogin, &w, &QLsCoreSystem::slotLogin);

	l.show();

	return a.exec();
}
